Telegram Group & Telegram Channel
sleep() vs wait()?

Thread.sleep(ms) — усыпляет поток на указанное время, не освобождая монитор. После паузы поток продолжает выполнение. Используется для временной задержки.

wait() — освобождает монитор и переводит поток в состояние ожидания, пока другой поток не вызовет notify() или notifyAll(). Используется для координации потоков в синхронизированных блоках.

Главное отличие: sleep() просто ставит поток на паузу, wait() передает управление другим потокам, освобождая ресурс.

🐸 Библиотека собеса по Java
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/java_interview_lib/831
Create:
Last Update:

sleep() vs wait()?

Thread.sleep(ms) — усыпляет поток на указанное время, не освобождая монитор. После паузы поток продолжает выполнение. Используется для временной задержки.

wait() — освобождает монитор и переводит поток в состояние ожидания, пока другой поток не вызовет notify() или notifyAll(). Используется для координации потоков в синхронизированных блоках.

Главное отличие: sleep() просто ставит поток на паузу, wait() передает управление другим потокам, освобождая ресурс.

🐸 Библиотека собеса по Java

BY Библиотека собеса по Java | вопросы с собеседований


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_interview_lib/831

View MORE
Open in Telegram


Библиотека собеса по Java | вопросы с собеседований Telegram | DID YOU KNOW?

Date: |

Can I mute a Telegram group?

In recent times, Telegram has gained a lot of popularity because of the controversy over WhatsApp’s new privacy policy. In January 2021, Telegram was the most downloaded app worldwide and crossed 500 million monthly active users. And with so many active users on the app, people might get messages in bulk from a group or a channel that can be a little irritating. So to get rid of the same, you can mute groups, chats, and channels on Telegram just like WhatsApp. You can mute notifications for one hour, eight hours, or two days, or you can disable notifications forever.

Telegram Gives Up On Crypto Blockchain Project

Durov said on his Telegram channel today that the two and a half year blockchain and crypto project has been put to sleep. Ironically, after leaving Russia because the government wanted his encryption keys to his social media firm, Durov’s cryptocurrency idea lost steam because of a U.S. court. “The technology we created allowed for an open, free, decentralized exchange of value and ideas. TON had the potential to revolutionize how people store and transfer funds and information,” he wrote on his channel. “Unfortunately, a U.S. court stopped TON from happening.”

Библиотека собеса по Java | вопросы с собеседований from ms


Telegram Библиотека собеса по Java | вопросы с собеседований
FROM USA